<?php

namespace App\Models\Payment\Platform;

use App\Models\Payment\PaymentOrder;
use App\Models\Payment\RefundOrder;

interface BasePlatformInterface
{

    static public function optionalDatValidator(string $tradeType, array $optionalDat): array;

    public static function notifyDatFilter($rawNotifyDat): array;

    public function toPay(string $tradeType, PaymentOrder $paymentOrder);

    public function toQuery(PaymentOrder $paymentOrder);

    public function toRefund(RefundOrder $refundOrder);

    public function toClose(PaymentOrder $paymentOrder);

    public function handleNotify(PaymentOrder $paymentOrder, array $notifyDat);

    public function responseAdapter(array &$response = []): array;

    public function paidCode(): string;

}
